<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
    <head>
        <title><?php echo $title; ?> | giasoc.com.vn</title>
        <base href="<?php echo $base; ?>" />
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <?php if ($description) { ?>
            <meta name="description" content="<?php echo $description; ?> | giasoc.com.vn | Bán buôn linh kiện phụ kiện máy tính | Phân phối linh kiện phụ kiện máy tính" />
        <?php } ?>
        <?php if ($keywords) { ?>
            <meta name="keywords" content="<?php echo $keywords; ?> | giasoc.com.vn | Bán buôn linh kiện phụ kiện máy tính | Phân phối linh kiện phụ kiện máy tính" />
        <?php } ?>
        <?php if ($icon) { ?>
            <link href="<?php echo $icon; ?>" rel="icon" />
        <?php } ?>
        <?php foreach ($links as $link) { ?>
            <link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
        <?php } ?>
        <link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/stylesheet.css" />

			    <link href="catalog/view/theme/default/stylesheet/cloud-zoom.css" rel="stylesheet" type="text/css" />
			
        <?php foreach ($styles as $style) { ?>
            <link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
        <?php } ?>
        <script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
        <link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
        <script type="text/javascript" src="catalog/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
        <script type="text/javascript" src="catalog/view/javascript/jquery/colorbox/jquery.colorbox.js"></script>
        <link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/colorbox/colorbox.css" media="screen" />
        <script type="text/javascript" src="catalog/view/javascript/jquery/tabs.js"></script>
        
      <script type="text/javascript" src="catalog/view/javascript/add2cart-go2cart/common.js"></script>
   

			  	<script type="text/JavaScript" src="catalog/view/javascript/cloud-zoom.1.0.2.min.js"></script>
			
        <?php foreach ($scripts as $script) { ?>
            <script type="text/javascript" src="<?php echo $script; ?>"></script>
        <?php } ?>
        <script type="text/javascript" src="catalog/view/javascript/jquery.jcarousel.min.js"></script>
        <script type="text/javascript" src="catalog/view/javascript/script.js"></script>
        <!--[if IE 7]>
        <link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie7.css" />
        <![endif]-->
        <!--[if lt IE 7]>
        <link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
        <script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
        <script type="text/javascript">
        DD_belatedPNG.fix('#logo img');
        </script>
        <![endif]-->
        <?php echo $google_analytics; ?>
<style type="text/css">.menu3 {
	min-height:50px;
	clear:both;
	padding:0px;	
}
.menu3 ul#topnav ul.children li.pic_name h3 a{
	float:left;
	margin:0 0 0 0;
	font-size:18px;
}
.menu3 ul#topnav ul.children li.pic_name h3 a span {
	padding:30px 0 0 0;
}
.menu3 ul#topnav ul.children li.pic_name h3 a:hover {
	color:#333;
}
.menu3 ul#topnav {
	margin:0;
	padding:0;
	background:url(image/menu.png) top center repeat-x #000000;
	display:block;
	width:100%;
	min-height:45px;
	position:relative;
}
.menu3 ul#topnav li {
	display: block;
	float: left;
	list-style: none;
	margin:0;
	z-index:1099;
	height: 50px;
	line-height: 20px;
}
.menu3 ul#topnav li.dropdown {
	background:url(image/nav_arrow3.png) 97% 15px no-repeat;
}
.menu3 ul#topnav li a {
	color: #f9f9f9;
	display: block;
	float: left;
	font-size: 13px;
	font-weight: bold;
	padding: 12px 18px;
	text-decoration: none;
	white-space: nowrap;
}
.menu3 ul#topnav li:hover {
	z-index:1600;
}
.menu3 ul#topnav li:hover a {
	color:#333333;
	background-color:#fff;
}
.menu3 ul#topnav li.dropdown:hover a {
	background-color:#fff;
}
.menu3 ul#topnav ul.children {
	position:absolute;
	display:none;
	width:928px;
	top:44px;
	left:0;
	z-index:9998;
	padding:12px 10px 45px 10px;
	margin:0;
	background:url(image/back_menu.png) bottom center no-repeat;
	float:left;
	-webkit-border-radius: 0px 0px 6px 6px;
	-moz-border-radius: 0px 0px 6px 6px;
	-khtml-border-radius: 0px 0px 6px 6px;
	border-radius: 0px 0px 6px 6px;
}
.menu3 ul#topnav ul.children2 {
	position:absolute;
	display:none;
	top:43px;
	left:0px;
	z-index:9999;
	padding:5px 0px;
	margin:0;
	float:left;
	background-color:#fff;
	width:100%;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	-khtml-border-radius: 5px;
	border-radius: 5px;
	border-radius: 5px;
	box-shadow: 0px 0px 5px #999999;
	-moz-box-shadow: 0px 0px 5px #999999;
	-webkit-box-shadow: 0px 0px 5px #999999;
}
.menu3 ul#topnav ul.children li {
	float:left;
	height:auto;
	border-bottom:1px solid #f1f1f1;
	position:relative;
	margin:0 0 2px 2px;
	padding:0;
	width:33%;
}
.menu3 ul#topnav ul.children li img {
	float:left;
	margin:0px 15px 0px 0px;
	border:1px solid #fff;
}
ul.children li a span {
	padding:10px 0;
	float:left;
}
.menu3 ul#topnav ul.children2 li {
	float:left;
	height:auto;
	border-bottom:1px solid #f1f1f1;
	position:relative;
	margin:0;
	padding:0;
	width:100%;
}
.menu3 ul#topnav ul.children a, .menu3 ul#topnav li:hover ul.children a {
	display:block;
	height:auto;
	width:100%;
	padding:0px 0px 2px 0px;
	float:left;
	font-size:12px;
	font-weight:normal;
	background:none;
	text-align:left;
	text-transform:none;
	color:#333;
	border:none;
	margin:0;
}
.menu3 ul#topnav ul.children2 a, .menu3 ul#topnav li:hover ul.children2 a {
	display:block;
	height:auto;
	width:285px;
	padding:10px 8px 10px 13px;
	float:left;
	font-size:12px;
	font-weight:normal;
	background:none;
	text-align:left;
	text-transform:none;
	color:#333;
	border:none;
	margin:0;
}

.menu3 ul#topnav li:hover .children li ul.children2 a {
	color:#222;
}
.menu3 ul#topnav li:hover .children li ul.children2 a:hover {
	background-color:#f1f1f1;
}
.menu3 ul#topnav ul.children li.dropdown, .menu3 ul#topnav li:hover ul.children li.dropdown {
	background:url(image/nav_arrow.png) 270px 16px no-repeat;
}
.menu3 ul#topnav ul.children li a:hover {
	color:#cecece;
}
.menu3 ul#topnav ul.children li.pic_name {
	padding:10px 5px 15px 10px;
	border-bottom:1px solid #e1e1e1;
	width:913px;
	height:50px;
	margin:0 0 15px 0;
	display:block;
}
.menu3 ul#topnav ul.children li.pic_name img {
	float:left;
	margin:0 10px 0 0;
}</style>


                        <script type="text/javascript" src="catalog/view/javascript/jquery/booklet/jquery.easing.1.3.js"></script>
                        <script type="text/javascript" src="catalog/view/javascript/jquery/booklet/jquery.booklet.1.4.0.min.js"></script>
                        <link href="catalog/view/javascript/jquery/booklet/jquery.booklet.1.4.0.css" type="text/css" rel="stylesheet" media="screen, projection, tv" />
                        
            
<style type="text/css" >
div.list, div.grid { width: 24px; height: 24px; background: url() no-repeat scroll 0% 0% transparent; cursor: pointer; float: left; margin-right: 5px; }
div.list { background-position: 0px 0px; }
div.list:hover { background-position: 0px -24px; }
div.list:active { background-position: 0px -48px; }
div.list-active { background-position: 0px -48px; }
div.grid { background-position: -24px 0px; }
div.grid:hover { background-position: -24px -24px; }
div.grid-active { background-position: -24px -48px; }
div.grid:active { background-position: -24px -48px; }
</style>
    </head>
    <body>
	<head>
	<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
	<!-- the necessary css for yukari -->	
	<link rel="stylesheet" type="text/css" media="screen,projection" href="catalog/yukari/yukari.css" />
	
	<style type="text/css" media="screen">
		*{margin:0 auto;}
		#wrapper {width:90%;margin:15px auto;}
		p { margin:20px 0;}
	</style>
	<!-- yukari plugin -->
	<script src="catalog/yukari/yukari.js" type="text/javascript"></script>

		
	<script type="text/javascript">
		$(document).ready(function() {
			/*
			var defaults = {
	  			containerID: 'yukari', // fading element id
				containerHoverClass: 'yukarihover', // fading element hover class
				scrollSpeed: 1000,
				easingType: 'linear' 
	 		};
			*/
			
			$().yukari({ easingType: 'easeOutQuart' });
			
		});
	</script>
</head>
</head>

        <div id="container">
            <div id="header">
                <?php if (!$logged) { ?>
                    <?php echo $text_welcome; ?>
                <?php } else { ?>
                    <?php echo $text_logged; ?>
                <?php } ?>
                <?php if ($logo) { ?>
                    <div id="logo"><a href="http://giasoc.com.vn"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>
                <?php } ?>
                <?php echo $language; ?>
                <?php echo $currency; ?>
                <?php echo $cart; ?>
                <div id="search">
                    <div class="button-search"></div>
                    <?php if ($filter_name) { ?>
                        <input type="text" name="filter_name" value="<?php echo $filter_name; ?>" />
                    <?php } else { ?>
                        <input type="text" name="filter_name" value="<?php echo $text_search; ?>" onclick="this.value = '';" onkeydown="this.style.color = '#000000';" />
                    <?php } ?>
                </div>
                <div id="welcome">

                </div>
                <div class="links"><a href="http://giasoc.com.vn"><?php echo $text_home; ?></a><a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a><a href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?></a><a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></div>
            </div>
            <div id="menu">
                <ul>
                    <?php if ($informations) { ?>
                        <?php foreach ($informations as $information) { ?>
                            <?php if ($information['id'] == $information_id) { ?>
                                <li><a class="active" href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
                            <?php } else { ?>
                                <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
                            <?php } ?>
                        <?php } ?>
                    <?php } ?>
               <!--  <li><a href="index.php?route=product/new"><?php echo $text_product; ?></a></li> -->

<div class="menu3">
      <?php 
 
$this->load->model('catalog/category');
$this->load->model('tool/image');
 
$categories_1 = $this->model_catalog_category->getCategories(0);  											
 
if ($categories_1) {$output = '<ul id="topnav">';}  															
 
foreach ($categories_1 as $category_1) {																			
	$output .= '<li>';
    $testPath = $base.'image/';
    $picCat = $this->model_tool_image->resize($category_1['image'],  50, 50);
	$unrewritten  = $this->url->link('product/category', 'path=' . $category_1['category_id']);
    $output .= '<a href="'.($unrewritten).'">' . $category_1['name'] . '</a>';								
 
	$categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']);
 
	if ($categories_2) {$output .= '<ul class="children"><li class="pic_name"><h3><a href="'.($unrewritten).'"><img src="'.$picCat.'" alt="' . $category_1['name'].'"/><span>' . $category_1['name'] . '</span></a></h3></li>';}												
 
	foreach ($categories_2 as $category_2) {
    	$subTestPath = $base.'image/';
        if ($category_2['image']) {
    $picSubCat = $this->model_tool_image->resize($category_2['image'],  40, 40);
    } else {
    $picSubCat = $base.'image/data/empty_pic.jpg';
    };
    																	
		$output .= '<li>';
		$sub_unrewritten = $this->url->link('product/category', 'path=' . $category_1['category_id'] . '_' . $category_2['category_id']);
		$output .= '<a href="'.($sub_unrewritten).'"><img src="'.$picSubCat.'" alt="' . $category_2['name'].'"/><span>' . $category_2['name'] . '</span></a>';
 		
		$categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']);
 
		if ($categories_3) {$output .= '<ul class="children2">';}
 
		foreach ($categories_3 as $category_3) {
			$output .= '<li>';
			$third_sub_unrewritten = $this->url->link('product/category', 'path=' . $category_1['category_id'] . '_' . $category_2['category_id'] . '_' . $category_3['category_id']);
			$output .= '<a href="'.($third_sub_unrewritten).'">'.$category_3['name'].'</a>';
			$output .= '</li>';
		}
 
		if ($categories_3) {$output .= '</ul>';}
			$output .= '</li>';
	}
	if ($categories_2) {$output .= '</ul>';}
		$output .= '</li>';
}
if ($categories_1) {$output .= '</ul>';}
echo $output;
?>
    </div> <?php $categories=''; ?>
<script>
if ( ! ( $.browser.msie && ($.browser.version == 6) ) ){
			$("ul#topnav li:has(ul)").addClass("dropdown");
		}
		
		$("ul#topnav li.dropdown").hover(function () {
												 
			$('ul:first', this).css({visibility: "visible",display: "none"}).slideDown('normal');
		}, function () {
			
			$('ul:first', this).css({visibility: "hidden"});
		});
		
		
		if ( ! ( $.browser.msie && ($.browser.version == 6) ) ){
			$("ul#topnav2 li:has(ul)").addClass("dropdown");
		}
		
		$("ul#topnav2 li.dropdown").hover(function () {
												 
			$('ul:first', this).css({visibility: "visible",display: "none"}).slideDown('normal');
		}, function () {
			
			$('ul:first', this).css({visibility: "hidden"});
		});
		
		
		$("div.prod_hold").hover(function () {
												 
			$('.info', this).css({visibility: "visible",display: "none"}).fadeIn(200);
		}, function () {
			
			$('.info', this).fadeOut(200);
		});
		
		$("div.prod_holder").hover(function () {
												 
			$('.info', this).css({visibility: "visible",display: "none"}).fadeIn(200);
		}, function () {
			
			$('.info', this).fadeOut(200);
		});
		
</script>
                    <?php if ($categories) { ?>
                        <?php foreach ($categories as $category) { ?>
                            <?php if ($category['category_id'] == $category_id) { ?>
                                <li><a class="active" href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
                                <?php } else { ?>
                                    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
                                    <?php } ?> 
                                    <?php if ($category['children']) { ?>
                                        <div>
                                            <?php for ($i = 0; $i < count($category['children']);) { ?>
                                                <ul>
                                                    <?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
                                                    <?php for (; $i < $j; $i++) { ?>
                                                        <?php if (isset($category['children'][$i])) { ?>
                                                            <li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
                                                        <?php } ?>
                                                    <?php } ?>
                                                </ul>
                                            <?php } ?>
                                        </div>
                                    <?php } ?>
                                </li>
                            <?php } ?>
                        <?php } ?>

                        <?php if ($categoriesnews) { ?>
                            <?php foreach ($categoriesnews as $cat) { ?>
                                <?php if ($cat['cat_id'] == $cat_id) { ?>
                                    <li><a class="active" href="<?php echo $cat['href']; ?>"><?php echo $cat['name']; ?></a>
                                    <?php } else { ?>
                                        <li><a href="<?php echo $cat['href']; ?>"><?php echo $cat['name']; ?></a>
                                        <?php } ?>	
                                        <?php if ($cat['children']) { ?>
                                            <div>
                                                <?php for ($i = 0; $i < count($cat['children']);) { ?>
                                                    <ul>
                                                        <?php $j = $i + ceil(count($cat['children']) / $cat['column']); ?>
                                                        <?php for (; $i < $j; $i++) { ?>
                                                            <?php if (isset($cat['children'][$i])) { ?>
                                                                <li><a href="<?php echo $cat['children'][$i]['href']; ?>"><?php echo $cat['children'][$i]['name']; ?></a></li>
                                                            <?php } ?>
                                                        <?php } ?>
                                                    </ul>
                                                <?php } ?>
                                            </div>
                                        <?php } ?>
                                    </li>
                                <?php } ?>
                            <?php } ?>
                            </ul>



                            </div>
                            <div id="notification"></div>
